<?php
date_default_timezone_set("UTC");
/**
 * authorize class
 *
 * @author K.Tamura <tamura@terras.co.jp>
 */
class tsAuth
{

    public function factory( $type = null )
    {
        $type = strtolower( $type );

        $instance = null;
        switch( $type )
        {
            case 'facebook':
                $cls_file = dirname( __FILE__ ) . '/tsAuth/tsAuth_' . $type . '.php';
                $cls_name = 'tsAuth_' . $type;
                break;
            case 'twitter':
                break;
        }

        if( true === is_file( $cls_file ) )
        {
            require_once( $cls_file );
            return new $cls_name;
        }
    }

    public function checkLogin(){}

}
